<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title></title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <css file="__PUBLIC__/css/base.css"/>
        <link type="text/css" href="__ROOT__/data/ui/css/flick/jquery-ui-1.8.23.custom.css" rel="stylesheet" />
        <script type="text/javascript" src="__ROOT__/data/ui/js/jquery-1.8.0.min.js"></script>
        <script type="text/javascript" src="__ROOT__/data/ui/js/jquery-ui-1.8.23.custom.min.js"></script>
		<script type="text/javascript" src="__ROOT__/data/Validform_v5.1_min.js"></script>
		<script type="text/javascript" src="__PUBLIC__/js/validate.js"></script>
		<script type="text/javascript" src="__PUBLIC__/js/admin.js"></script>
		<script type='text/javascript' src='__DATA__/datepicker/zebra_datepicker.js'></script>
		<link rel="stylesheet" type="text/css" href="__DATA__/datepicker/zebra_datepicker.css" />
		<jsconst />
		<script type="text/javascript">
            $(function(){
                $("#tabs").tabs();
            });
			/**调用日历**/
			$(function(){
				$('#datepicker-startDate').Zebra_DatePicker({
					direction: true,
					pair: $('#datepicker-endDate')
				});
				$('#datepicker-endDate').Zebra_DatePicker({
					direction: 1
				});
			});
        </script>
    </head>
    <body>
        <div class="now_path">
            <strong>您现在的位置：</strong>
            房屋管理>增加房屋
        </div>
		<div class="success_box">所有的选项都填写正确</div>
    	<div class="error_box"></div>
        <div id="tabs" style="width:100%">
            <ul>
                <li><a href="#tabs-1">添加房屋</a></li>
				<li><a href="#tabs-2">房屋信息</a></li>
				<li><a href="#tabs-3">房屋设施</a></li>
            </ul> 
			<form action="__CONTROL__/add_exe" method="post" class='tujia'>
            <div id="tabs-1">
                <table class="table2">
                    <tr>
                        <th>房屋名称：</th>
                        <td><input type="text" name="title" style="width:360px;"  nullmsg="请输入房屋名称！" datatype='*' class='inputvalidata'/>
						<span class="Validform_checktip"></span>
						</td>
                    </tr>
					<tr>
                        <th>位置：</th>
                        <td>
                        	<if value='isset($city) && isset($xiaoqu)'>
                        		当前选择的是：{$city.cname} > {$xiaoqu.qname}
								<input type='hidden' name='cid' value='{$city.cid}' />
								<input type='hidden' name='qid' value='{$xiaoqu.qid}' />
                        	<else />
								<select name='cid' id='city'>
									<option value=''>==请选择城市==</option>
									<foreach from='$citys' value='$v'>
										<option value='{$v.cid}'>{$v.cname}</option>
									</foreach>
								</select>
								<select name='qid' id='xiaoqu'>
									<option value=''>==请选择小区==</option>
								</select>
                        	</if>
						</td>
                    </tr>
					<tr>
                        <th>房屋景区：</th>
                        <td>
                        	<if value='isset($jingqu)'>
                        		<select name='jid' id='jingqu' msgerror= '请选择景区！' datatype='*'>
                        			<if value='empty($jingqu)'>
                        				<option value=''>==没有景区==</option>
									<else/>
										<foreach from='$jingqu' value='$v'>
	                        				<option value='{$v.jid}'>{$v.jname}</option>
	                        			</foreach>
                        			</if>
                        			
								</select>
							<else />
								<select name='jid' id='jingqu' msgerror= '请选择景区！' datatype='*' style=' display:block; float:left;'>
									<option value=''>==请选择景区==</option>
								</select>
                        	</if>
							<div class="Validform_checktip"></div>
						</td>
                    </tr>
					<tr>
                        <th>房屋价格：</th>
                        <td><input type="text" name="price" style="width:100px;"  nullmsg="请输入房屋价格！" datatype='n' msgerror='价格必须为数字!' class='inputvalidata'/>
						<span class="Validform_checktip"></span>
						</td>
                    </tr>
					<tr>
                        <th>开始时间：</th>
                        <td><div style=' position:relative;'><input type="text" name="startDate" id='datepicker-startDate' style='width:150px;'/></div>
						</td>
                    </tr>
					<tr>
                        <th>结束时间：</th>
                        <td><div style=' position:relative;'><input type="text" name="endDate" id='datepicker-endDate' style='width:150px;'/></div>
						</td>
                    </tr>
					<tr>
                        <th>房屋缩略图(裁)：</th>
                        <td><upload name='thumb11' imagesize='150,110' limit='1' text='上传缩略图'/>
						</td>
                    </tr>
					<tr>
                        <th>房屋图片集(670x390)(裁)：</th>
                        <td><upload name='house_img' imagesize='70,43' text='上传图片'/>
						</td>
                    </tr>
					<tr>
                        <th>房屋介绍：</th>
                        <td><editor name='house_data[house_jieshao]' height='250' />
						</td>
                    </tr>
					<tr>
                        <th>是否显示：</th>
                        <td><input type="radio" name="status" checked='checked' value='1'/>是&nbsp;
						<input type="radio" name="status" value='0'/>否
						</td>
                    </tr>
                </table>
            </div>
			<div id="tabs-2">
				<table class='table2'>
					<tr>
                        <th>房屋数量：</th>
                        <td><input type='text' name='num' value='1'  class='inputvalidata' style="width:60px;"   nullmsg='房屋数量不能为空' datatype='n'/>
							<span class="Validform_checktip"></span>
						</td>
                    </tr>
					<tr>
                        <th>是否接机：</th>
                        <td><input type='radio' name='jieji' value='1' />是&nbsp;
						<input type='radio' name='jieji' value='0' checked='checked' />否&nbsp;
						</td>
                    </tr>
					<tr>
                        <th>登记入住前厅地址：</th>
                        <td><input type="text" name="qianting" style="width:360px;" value='' class='inputvalidata' style="width:360px;"/>
						</td>
                    </tr>
					<tr>
                        <th>管理公司：</th>
                        <td><select name='company' id='company' msgerror='请选择管理公司' datatype='*' class='selectvalidata'>
								<option value=''>==请选择管理公司==</option>
							</select>
							&nbsp;&nbsp;<a href='__WEB__/admin/company/addcompany' style=' text-decoration:underline; display:block; float:left;' target='_blank'>添加管理公司</a>
							<div class="Validform_checktip"></div>
						</td>
                    </tr>
					<tr>
                        <th>推荐入住人数：</th>
                        <td><select name='ruzhu'>
								<option value='1'>1</option>
								<option value='2'>2</option>
								<option value='3'>3</option>
								<option value='4'>4</option>
								<option value='5'>5</option>
								<option value='6'>6</option>
								<option value='7'>7</option>
								<option value='8'>8</option>
								<option value='9'>9</option>
								<option value='10'>10</option>
							</select>人
							&nbsp;||&nbsp;床数量&nbsp;
							<select name='chuang'>
								<option value='1'>1</option>
								<option value='2'>2</option>
								<option value='3'>3</option>
								<option value='4'>4</option>
								<option value='5'>5</option>
								<option value='6'>6</option>
								<option value='7'>7</option>
								<option value='8'>8</option>
								<option value='9'>9</option>
								<option value='10'>10</option>
							</select>张
							&nbsp;||&nbsp;卧室数量&nbsp;
							<select name='woshi'>
								<option value='1'>1</option>
								<option value='2'>2</option>
								<option value='3'>3</option>
								<option value='4'>4</option>
								<option value='5'>5</option>
								<option value='6'>6</option>
								<option value='7'>7</option>
								<option value='8'>8</option>
								<option value='9'>9</option>
								<option value='10'>10</option>
							</select>张
						</td>
                    </tr>
                    <tr>
                    	<th>房屋景观:</th>
                    	<td>
                    		<select name='jinguan' msgerror='请选择房屋景观' nullmsg='房屋景观不能为空' datatype='*' class='selectvalidata'>
								<option value=''>==请选择房屋景观==</option>
								<foreach from='$jingguan' value='$v'>
									<option value='{$v.jgid}'>{$v.jgname}</option>
								</foreach>
							</select>
							<div class="Validform_checktip"></div>
                    	</td>
                    </tr>
					<tr>
                        <th>房屋面积：</th>
                        <td><input type="text" name="area" class='inputvalidata' style="width:60px; display:inline-block;" nullmsg='房屋面积不能为空' datatype='n' errormsg='房屋面积不正确'/><div style='float:left;'>平方</div>
							<span class="Validform_checktip"></span>
						</td>
                    </tr>
					<tr>
                        <th>可以加床？：</th>
                        <td>
							<select name='jiachuang'>
								<option value='0'>不能加床</option>
								<option value='1'>+1</option>
								<option value='2'>+2</option>
								<option value='3'>+3</option>
								<option value='4'>+4</option>
								<option value='5'>+5</option>
							</select>
							&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;房屋所在楼层:<input type='text' size='5' name='house_data[floors]' />层
						</td>
                    </tr>
					<tr>
                        <th>房屋格局：</th>
                        <td>
                        	<select name='geju[]'>
                        		<option value='1'>1</option>
                        		<option value='2'>2</option>
                        		<option value='3'>3</option>
                        		<option value='4'>4</option>
                        		<option value='5'>5</option>
                        	</select>室
                        	<select name='geju[]'>
                        		<option value='1'>1</option>
                        		<option value='2'>2</option>
                        		<option value='3'>3</option>
                        		<option value='4'>4</option>
                        		<option value='5'>5</option>
                        	</select>厅
                        	<select name='geju[]'>
                        		<option value='1'>1</option>
                        		<option value='2'>2</option>
                        		<option value='3'>3</option>
                        		<option value='4'>4</option>
                        		<option value='5'>5</option>
                        	</select>卫
						</td>
                    </tr>
					
					<tr>
                        <th>房屋地址：</th>
                        <td><input type="text" name="address" class='inputvalidata' style="width:360px;" value='' nullmsg='房屋地址不能为空' datatype='s5-20'/>
							<span class="Validform_checktip"></span>
						</td>
                    </tr>
					<tr>
                        <th>房屋样式：</th>
                        <td>
                        	<foreach from='$yangshi' value='$v'>
								<label from='yangshi'><input id='yangshi' type='radio' name='yangshi' value='{$v.yname},{$v.yid}' <if value='$v.yname eq "平层"'>checked='checked'</if>/>{$v.yname}</label>
							</foreach>
						</td>
                    </tr>
                    <tr>
                    	<th>优惠信息(<a href='javascript:;' id='addHui' index = '1'>&nbsp;<font style='color:red;'>加</font>&nbsp;</a>):</th>
                    	<td>
                    		<dl>
                    			<dd style='margin-top:5px;'><input type='text' name='house_youhui[1][value]' style='display:block; width:500px;' /></dd>
                    		</dl>
                    	</td>
                    </tr>
					<tr>
                        <th>其他服务(<a href='javascript:;' id='addOtherServer' index = '1'>&nbsp;<font style='color:red;'>加</font>&nbsp;</a>)：</th>
                        <td>
                        	<table class='table5'>
                        		<tr>
                        			<td style='width:100px;'>服务项目</td>
									<td width='500'>服务内容</td>
                        		</tr>
                        		<tr class='yonghu'>
                        			<td style='width:100px;'><input type='text' name='house_otherserver[1][]' style='display:bloack; width:100px;'></td>
									<td><input type='text' name='house_otherserver[1][]' style='width:700px; display:block;'></td>
                        		</tr>
                        	</table>
                        </td>
                    </tr>
					
				</table>
			</div>
			<div id="tabs-3">
				<table class='table2'>
					<tr>
						<td>房间设施:</td>
						<td>
							<foreach from='$sheshi' value='$v'>
								<label><input type='checkbox' name='house_sheshi_rel[][hsid]' value='{$v.hsid}' />{$v.sname}&nbsp;</label>
							</foreach>
						</td>
					</tr>
					<tr>
						<td>提供服务</td>
						<td>
							<foreach from='$fuwu' value='$v'>
								<label><input type='checkbox' name='house_fuwu_rel[][fwid]' value='{$v.fwid}' />{$v.fwname}&nbsp;</label>
							</foreach>
						</td>
					</tr>
					<tr>
						<td>物品及其位置(<a href='javascript:;' id='addPosition' index ='1'>&nbsp;<font style='color:red;'>加</font>&nbsp;</a>):</td>
						<td>
							<table class='table5'>
                        		<tr>
                        			<td>位置</td>
                        			<td>物品名称</td>
                        			<td>规格</td>
									<td>数量</td>
                        		</tr>
                        		<tr>
                        			<td>
                        				<select name='house_position[1][weizhi]'>
                        					<option value='卧室'>卧室</option>
                        					<option value='客厅'>客厅</option>
                        					<option value='阳台'>阳台</option>
                        					<option value='厨房'>厨房</option>
                        					<option value='卫生间'>卫生间</option>
                        					<option value='其他'>其他</option>
                        				</select>
                        			</td>
                        			<td><input type='text' name='house_position[1][sheshi]' style='width:200px;' /></td>
                        			<td><input type='text' name='house_position[1][guige]'  style='width:200px;' /></td>
                        			<td><input type='text' name='house_position[1][shuliang]'  style='width:200px;' /></td>
                        		</tr>
                        	</table>
						</td>
					</tr>
					<tr>
						<td>房屋特色:</td>
						<td style='width:900px;'>
							<foreach from='$tese' value='$v'>
								<label><input type='checkbox' name='house_tese_rel[][tsid]' value='{$v.tsid}' />{$v.tsname}&nbsp;</label>
							</foreach>
						</td>
					</tr>
				</table>
			</div>
			<input type="submit" class="submit" value="添加文章" name='submit'/>
			</form>
        </div>
    </body>
</html>
